package com.zly.entity.enums;

public enum PlaceholderType {
    COMMON("$"),
    ;

    private final String symbolString;

    private PlaceholderType(String symbolString) {
        this.symbolString = symbolString;
    }

    //从字符串值转为枚举值
    public static PlaceholderType fromSymbol(String symbolString) {
        for(PlaceholderType placeholderType : values()) {
            if(placeholderType.symbolString.equals(symbolString)) {
                return placeholderType;
            }
        }
        return null;
    }

    public String getSymbolString() {
        return this.symbolString;
    }

}
